package com.shop.core;

import java.util.List;

/**
 * 商品详情类,与商品分类列表、商品搜索列表共用
 * @author yuxiaowei
 *
 */
public class Goods {
	private String id;
	private String name;
	private double hgprice;
	private double price;
	private int reserve;//库存量
	private String intro1;
	private String intro2;
    
    private List<SizeAndColor> colorSize;//颜色加尺寸
	
	private int assess;
	private String onshelftime;
	private int sold;
	private String smallicon="ceshi/none.png";
	public String getSmallicon() {
		if(imgs!=null&&imgs.size()>0)
		{
			smallicon=imgs.get(0);//如果有图片就获取第一张作为列表图标
		}
		return smallicon;
	}
	

	public List<SizeAndColor> getColorSize() {
		return colorSize;
	}


	public void setColorSize(List<SizeAndColor> colorSize) {
		this.colorSize = colorSize;
	}


	public void setSmallicon(String smallicon) {
		this.smallicon = smallicon;
	}
	private List<String> imgs;
	public List<String> getImgs() {
		return imgs;
	}
	public void setImgs(List<String> imgs) {
		this.imgs = imgs;
	}
	//@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "[id="+id+",name="+name+",hgprice="+hgprice+",price="+price+",reserve="+reserve+",intro1="+intro1+",intro2="+intro2+",assess="+assess+",onshelftime="+onshelftime
		+",sold="+sold+"]";
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public double getHgprice() {
		return hgprice;
	}
	public void setHgprice(double hgprice) {
		this.hgprice = hgprice;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public int getReserve() {
		return reserve;
	}
	public void setReserve(int reserve) {
		this.reserve = reserve;
	}
	public int getAssess() {
		return assess;
	}
	public String getIntro1() {
		return intro1;
	}
	public void setIntro1(String intro1) {
		this.intro1 = intro1;
	}
	public String getIntro2() {
		return intro2;
	}
	public void setIntro2(String intro2) {
		this.intro2 = intro2;
	}
	public void setAssess(int assess) {
		this.assess = assess;
	}
	public String getOnshelftime() {
		return onshelftime;
	}
	public void setOnshelftime(String onshelftime) {
		this.onshelftime = onshelftime;
	}
	public int getSold() {
		return sold;
	}
	public void setSold(int sold) {
		this.sold = sold;
	}
	
	
	
}
